package t3;

import java.io.FileInputStream;
import java.io.FileOutputStream;

/**
 * @Author admin
 * @Date 2019/4/9 17:01
 */
public class CopyFile {
    public static void main(String[] args) {

        try{
            FileInputStream fis=new FileInputStream("example.tex");
            FileOutputStream fos=new FileOutputStream("D:\\a.txt",true);
            int len=0;
            while ((len=fis.read())!=1){
                fos.write(len);
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
